<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/static/layui-v2.4.5/layui/css/layui.css"  media="all">
    <script src="/static/layui-v2.4.5/layui/layui.js"></script>
    <title>Title</title>
</head>
<body >
<div style="display: flex;align-items: center;justify-content: center;margin-top: 17vh;">
<form class="layui-form" action="" method="post" style="width: 60%;">
    <div class="layui-form-item">
        <label class="layui-form-label">选择分块</label>
        <div class="layui-input-block">
            <select name="fd_class" lay-verify="required">
                <option value="1">hello world</option>
                <option value="2">详解</option>
                <option value="3">博客</option>
            </select>
        </div>
    </div>
    <div style="height: 3vh;"></div>
    <div class="layui-form-item">
        <label class="layui-form-label">标题</label>
        <div class="layui-input-block">
            <input type="text" name="fd_name" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div style="height: 3vh;"></div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">简介</label>
        <div class="layui-input-block">
            <textarea name="fd_introduction" placeholder="请输入内容" class="layui-textarea"></textarea>
        </div>
    </div>
    <div style="height: 3vh;"></div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" >立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
</div>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
</script>
</body>
</html>